package com.log.james.service;

import com.log.james.entity.FwlogFlow;
import com.log.james.mapper.FwlogFlowDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Service
public class FwlogFlowService implements FwlogFlowDao,Serializable{
    @Autowired
    private FwlogFlowDao fwlogFlowDao;
    @Override
    public List<FwlogFlow> findByTime() {
        List<FwlogFlow> flows = fwlogFlowDao.findByTime();
        return flows;
    }

    @Override
    public FwlogFlow findFlowByTime(Date time) {
        FwlogFlow fwlogFlow = fwlogFlowDao.findFlowByTime(time);
        return fwlogFlow;
    }

    @Override
    public List<FwlogFlow> getHalfHourData() {
        List<FwlogFlow> fwlogFlows = fwlogFlowDao.getHalfHourData();
        return fwlogFlows;
    }

    @Override
    public List<FwlogFlow> getTodayAllData(Date time) {
        List<FwlogFlow> fwlogFlows = fwlogFlowDao.getTodayAllData(time);
        return fwlogFlows;
    }

    @Override
    public List<FwlogFlow> findFwlogFlowByTime(Date st, Date et) {
        List<FwlogFlow> fwlogFlows = fwlogFlowDao.findFwlogFlowByTime(st,et);
        return fwlogFlows;
    }
}
